1. Field of the Invention
This invention relates to device drivers and, more particularly, to updating a device abstraction layer to support a new device.
2. Description of the Related Art
Many ISV (Independent Software Vendors) have software products that need to interact with various devices through device drivers. These device drivers are typically specific to a particular OEM (Original Equipment Manufacturer) as well as to a specific operating system platform. If a software product is to be compatible with 10 operating system platforms and devices provided by 10 different OEMs, 100 drivers are needed. Maintaining such a large number of device drivers may itself be difficult. Additionally, updating device drivers each time a new device is released by an OEM may consume a large amount of time, programming resources, and testing resources.
FIG. 1 illustrates the typical process by which a driver is updated to provide compatibility with a new device. A vendor may provide a new device to an ISV that wants to provide support for that new device, as indicated at 11. The ISV may update device driver source code in order to add the device's inquiry string (e.g., a string formed from the devices vendor ID and product ID) to an existing driver so that the device driver recognizes the new device, as shown at 13.
If the device is a rebadge of an already supported device, qualification testing may be skipped, as indicated at 15-17. Otherwise, qualification testing may be performed to see if the device driver operates properly with the new device, as shown at 17. During qualification testing, the device driver source code may again be updated (e.g., to support a special feature implemented by the new device that was not previously supported by the device driver).
Additionally, the driver may need to be regression-tested to ensure that any modifications to the source code have not caused an incompatibility with a previously-supported device, as indicated at 19. If the regression testing fails, as determined at 21, the qualification testing and/or regression testing may be repeated until the regression testing passes. Additionally, the regression testing may be repeated for each operating system with which the driver is operable. If the regression testing passes, the ISV may then release the updated driver to customers, as shown at 23.
Often, a new device has the same or similar functionality as an existing device for which the ISV already provides support. For example, in order reduce the time and effort required to support new devices, a driver may use an external mapping table to map new devices to a particular device type. The driver may handle requests targeting that device according to which device type is associated with that device in the mapping table. In order to provide support for a new device that operates similarly to an already-supported device, the external mapping table may be updated to map the new device to the device type of the already supported device. Accordingly, by providing a new mapping table, support for new devices may be provided without needing to update the actual source code of the driver.
One complication that arises when using a table to determine how to handle a device occurs when a new device does not map to any of the already-supported device types. For example, different vendors often rebadge the same OEM's device. Each vendor may write new firmware for the device, which may lead to hybridized devices that behave differently than devices of the same type and OEM that are released by other vendors. For example, a vendor may write new firmware for a device made by a particular OEM and resell that device with a new vendor ID and product ID. Due to the firmware changes, the rebadged device may behave differently than other devices made by the same OEM. Furthermore, the device may also not behave exactly like any of the vendor's other devices. As a result, no existing device type may adequately match the functionality of the new device, and it may be impossible to provide support for the new device without updating the device driver.